import request from "@/utils/request"
import { BusinessData, OverviewDishes, OverviewOrders, OverviewSetmeals } from "../../types/dashboard"
/**
 * 查询今日运营数据
 * @returns 
 */
export const getBusinessDataAPI = (businessId: number) => {
  return request<BusinessData>({
    method: 'GET',
    url: '/business/workspace/businessData',
    params: { businessId }
  })
}
/**
 * 查询订单管理数据
 * @returns 
 */
export const getOverviewOrdersAPI = (businessId?: number) => {
  return request<OverviewOrders>({
    method: 'GET',
    url: '/business/workspace/overviewOrders',
    params: { businessId }
  })
}
/**
 * 菜品总览
 * @returns 
 */
export const getOverviewDishesAPI = (businessId?: number) => {
  return request<OverviewDishes>({
    method: 'GET',
    url: '/business/workspace/overviewDishes',
    params: { businessId }
  })
}
/**
 * 套餐总览
 * @returns 
 */
export const getOverviewSetmealsAPI = (businessId?: number) => {
  return request<OverviewSetmeals>({
    method: 'GET',
    url: '/business/workspace/overviewSetmeals',
    params: { businessId }
  })
}